package me.ywy.skin.skincore.utils;

import android.content.Context;
import android.content.res.TypedArray;

/**
 * Created by ywy on 2018-04-26.
 */
public class SkinThemeUtils {

    public static int[] getResId(Context context , int[] attrs){
        TypedArray typedArray = context.obtainStyledAttributes(attrs);
        int[] resIds = new int[typedArray.length()];
        for (int i = 0; i < typedArray.length(); i++) {
            resIds[i] = typedArray.getResourceId(i,0);
        }
        typedArray.recycle();
        return resIds;
    }

}
